import type {LoginParams, RegisterParams} from "@/api/Sign.ts";
import type {Id} from "@/api/Common.ts";
import type {UserVO} from "@/api/User.ts";
import httpClient from '@/api/client.ts'

export const SinApi ={
  login: async (params: LoginParams): Promise<UserVO> => {
    const {data} = await httpClient.post<UserVO>('/user/login', params)
    return data
  },
  register: async (params: RegisterParams): Promise<Id> => {
    const {data} = await httpClient.post('/user/register', params)
    return data
  }
}
